<template>
	<view class="home-item">
		<view class="item-main" @tap="goStart(item)">
			<view class="item-content">
				<!-- <image src="../../static/home.webp" class="left" mode=""></image> -->
				<view class="item-text">{{ item.className }}</view>
				<!-- <image src="../../static/logo.png" mode=""></image> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item:{
				type:Object,
				default: {}
			}
		},
		data(){
			return {
				
			}
		},
		methods: {
			goStart(item){
				uni.navigateTo({
					// 因为图片的网络地址有特殊符号，比如 &、%等，需要 encodeURIComponent()进行加密，在需要页面再进行解密
					url: '../../pages/start-school/start-school?item=' + encodeURIComponent(JSON.stringify(item))
				})
			}
		}
	}
</script>

<style scoped>
	.home-item {
		width: 320rpx;
		height: 404rpx;
		background: #fff;
		box-shadow: 0rpx 24rpx 38rpx 0rpx rgba(60,128,209,0.09);
		position: relative;
		border-radius: 30rpx;
		margin-bottom: 40rpx;
	}
	.item-main {
		width: 294rpx;
		height: 371rpx;
		background: url('https://img1.baidu.com/it/u=2701006901,215195107&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=667');
		background-repeat: no-repeat;
		background-size: cover;
		position: absolute;
		top: 15rpx;
		left: 10rpx;
	}
	.item-content {
		padding-top: 290rpx;
		text-align: center;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #fff;
	}
	.item-content image {
		width: 30rpx;
		height: 20rpx;
	}
	.left-arrow {
		transform: rotate(180deg);
	}
	.item-text {
		font-size: 36rpx;
	}
</style>